import request from '@/utils/request'

// 查询巡检点列表
export function listPatrolPoint(query) {
  return request({
    url: '/ptwn/patrolpoint/list',
    method: 'get',
    params: query
  })
}
// 查询巡检点列表 不含分页
export function listPatrolPoints(query) {
  return request({
    url: '/ptwn/patrolpoint/lists',
    method: 'get',
    params: query
  })
}
//根据机器人id查询巡检点列表
export function listPointsByRobotId(id) {
  return request({
    url: '/ptwn/patrolpoint/points/' + id,
    method: 'get'
  })
}
//修改按钮操作---查询详情
export function getPatrolPoint(id) {
  return request({
    url: '/ptwn/patrolpoint/' + id,
    method: 'get'
  })
}

// 点位设置修改
export function updatePatrolPoint(data) {
  return request({
    url: '/ptwn/patrolpoint',
    method: 'put',
    data: data
  })
}

// 删除点位信息
export function delPatrolPoint(id) {
  return request({
    url: '/ptwn/patrolpoint/' + id,
    method: 'delete'
  })
}
// 修改公告
export function updatePatrolPointNum(data) {
  return request({
    url: '/ptwn/patrolpoint/pointnum',
    method: 'put',
    data: data
  })
}
export function updatePatrolLabelNum(data) {
  return request({
    url: '/ptwn/patrolpoint/labelnum',
    method: 'put',
    data: data
  })
}
// 修改公告
export function updatePatrolPondNum(data) {
  return request({
    url: '/ptwn/patrolpoint/pondnum',
    method: 'put',
    data: data
  })
}
